$(document).ready(function(){
    $("#login").click(function(event) {
        var name = $("#username").val();
        var pwd = $("#password").val();
        if(name=="")
        {
            alert("用户名不能为空！");
        }
        else if(pwd=="")
        {
            alert("密码不能为空！");
        }
        var data = {
            "user":name,
            "pwd":pwd,
        };
        $.post("/submit",data)


    });
});